package com.scetop.bank;
import java.util.ArrayList;
import java.util.Iterator;

public class Bank {
    public ArrayList<Customer> customers;
    public int numberOfCustomer;

    public Bank(){
        customers = new ArrayList<>();
        numberOfCustomer = 0;
    }

    private static Bank bank = new Bank();

    public static Bank getBank(){
        return bank;
    }

    public void addCustomer(String f, String l){
//        Customer customer = new Customer(f,l);
//        customers.add(customer);
//        numberOfCustomer++;

        customers.add(new Customer(f,l));
    }
    public int getNumOfCustomers(){
//        return numberOfCustomer;
        return  customers.size();
    }
    public Customer getCustomer(int index){

        return customers.get(index);
    }

    public Iterator<Customer> getCustomers(){
        return customers.iterator();
    }


}
